<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>斐波那契数列</title>
  <script>
    function f(n) {
      if (n === 1 || n===2){
        return 1;
      }
      return f(n-1)+f(n-2);
    }

    console.log(f(6))
  </script>
</head>
<body>

</body>
</html>